package com.xuan.controller;

import com.xuan.pojo.Dept;
import com.xuan.pojo.Dto.PageQueryDto;
import com.xuan.result.PageQueryResult;
import com.xuan.service.DeptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/dept")
public class DeptController {
    @Autowired
    DeptService deptService;
    @GetMapping
    public List<Dept> selectAll(){
        return deptService.selectAll();
    }
    @GetMapping("/pageQuery")
    public PageQueryResult<Dept> pageQuery(@RequestBody PageQueryDto pageQueryDto){
        PageQueryResult<Dept> pageQueryResult = new PageQueryResult<>();
        return pageQueryResult;
    }


}
